home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Tech Arsenal 1
/
Tech Arsenal (Arsenal Computer).ISO
/
tek-01
/
pdcurs21.zip
/
PORTABLE.ZIP
/
WMOVE.C
< prev
next >
Wrap
Text File
|
1992-11-21
|
2KB
|
61 lines
#define CURSES_LIBRARY 1
#include <curses.h>
#undef wmove
#ifndef NDEBUG
char *rcsid_wmove = "$Header: c:/curses/portable/RCS/wmove.c%v 2.0 1992/11/15 03:29:27 MH Rel $";
#endif
/*man-start*********************************************************************
wmove() - Move cursor in window
X/Open Description:
The cursor associated with the window is moved to the given
location. This does not move the physical cursor of the
terminal until refresh() is called. The position specified is
relative to the upper left corner of the window, which is (0,0).
NOTE: move() is a macro.
PDCurses Description:
There may be additional [window oriented] move routines associated
with other sections of the curses library. See those sections for
details.
X/Open Return Value:
These functions return OK on success and ERR on error.
PDCurses Errors:
It is an error to call this function with a NULL window pointer.
Portability:
PDCurses int wmove( WINDOW* win, int y, int x );
X/Open Dec '88 int wmove( WINDOW* win, int y, int x );
BSD Curses int wmove( WINDOW* win, int y, int x );
SYS V Curses int wmove( WINDOW* win, int y, int x );
**man-end**********************************************************************/
int wmove(WINDOW *win, int y, int x)
{
if (win == (WINDOW *)NULL)
return( ERR );
if ((x < 0) ||
(y < 0) ||
(x >= win->_maxx) ||
(y >= win->_maxy) ||
(y < win->_tmarg) ||
(y > win->_bmarg))
{
return( ERR );
}
win->_curx = x;
win->_cury = y;
return( OK );
}